package com.yale.elasticsearch.controller.query;

import com.yale.elasticsearch.dto.FuzzyDTO;
import com.yale.elasticsearch.service.query.FuzzyQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author :yale
 * @date : 2024/8/1
 */
@Api(tags = "查询-模糊查询")
@RestController
@RequestMapping("/query")
public class FuzzyQueryController {

    @Resource
    private FuzzyQueryService fuzzyQueryService;

    @ApiOperation(value = "模糊查询", notes = "模糊查询")
    @PostMapping("/fuzzy")
    public Object fuzzyQuery(@RequestBody FuzzyDTO fuzzyDTO) {
        return fuzzyQueryService.fuzzyQuery(fuzzyDTO);
    }

}
